fix: add UTF-8 encoding environment variables to VSCode terminal #8939
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR attempts to address Issue #8938 where UTF-8 characters in terminal commands were causing encoding errors.
Problem
When running Python commands with special characters like arrows (→), lambda (λ), Chinese characters (中文), or emoji (😀) through Roo Code's terminal, users were encountering encoding errors like:
Solution
Added UTF-8 encoding environment variables (
LANGandLC_ALLset toen_US.UTF-8) to the VSCode terminal environment configuration. This ensures proper handling of UTF-8 characters in terminal commands, matching the configuration already present in ExecaTerminal.Changes
LANG: "en_US.UTF-8"andLC_ALL: "en_US.UTF-8"to Terminal.getEnv() methodTesting
Fixes #8938
Feedback and guidance are welcome!
Important
Adds UTF-8 encoding environment variables to VSCode terminal to handle special characters.
LANG: "en_US.UTF-8"andLC_ALL: "en_US.UTF-8"toTerminal.getEnv()inTerminal.tsto handle UTF-8 characters.Terminal.spec.tsto verify UTF-8 environment variables are set.TerminalRegistry.spec.tsto expect new environment variables.This description was created by
for 3c0b574. You can customize this summary. It will automatically update as commits are pushed.